
int
CCpu::I0x00()
{
  BRK();
  return 7;
}

int
CCpu::I0x01()
{
  ORA(GET_DATA_PREINDEXED());
  return 6;
}

int
CCpu::I0x02()
{
  return 2;
}

int
CCpu::I0x03()
{
  return 2;
}

int
CCpu::I0x04()
{
  m_Register.PC++;
  return 3;
}

int
CCpu::I0x05()
{
  ORA(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0x06()
{
  ASL(GET_ADDR_ZEROPAGE());
  return 5;
}

int
CCpu::I0x07()
{
  return 2;
}

int
CCpu::I0x08()
{
  PHP();
  return 3;
}

int
CCpu::I0x09()
{
  ORA(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0x0A()
{
  ASL_A();
  return 2;
}

int
CCpu::I0x0B()
{
  return 2;
}

int
CCpu::I0x0C()
{
  m_Register.PC += 2;
  return 4;
}

int
CCpu::I0x0D()
{
  ORA(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0x0E()
{
  ASL(GET_ADDR_ABSOLUTE());
  return 6;
}

int
CCpu::I0x0F()
{
  return 2;
}

int
CCpu::I0x10()
{
  BPL();
  return 2;
}

int
CCpu::I0x11()
{
  ORA(GET_DATA_POSTINDEXED());
  return 5;
}

int
CCpu::I0x12()
{
  return 2;
}

int
CCpu::I0x13()
{
  return 2;
}

int
CCpu::I0x14()
{
  m_Register.PC++;
  return 4;
}

int
CCpu::I0x15()
{
  ORA(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0x16()
{
  ASL(GET_ADDR_ZEROPAGE_X());
  return 6;
}

int
CCpu::I0x17()
{
  return 2;
}

int
CCpu::I0x18()
{
  CLEAR_FLAG(C_FLAG);
  return 2;
}

int
CCpu::I0x19()
{
  ORA(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0x1A()
{
  return 2;
}

int
CCpu::I0x1B()
{
  return 2;
}

int
CCpu::I0x1C()
{
  m_Register.PC += 2;
  return 4;
}

int
CCpu::I0x1D()
{
  ORA(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0x1E()
{
  ASL(GET_ADDR_ABSOLUTE_X());
  return 7;
}

int
CCpu::I0x1F()
{
  return 2;
}

int
CCpu::I0x20()
{
  JSR();
  return 6;
}

int
CCpu::I0x21()
{
  AND(GET_DATA_PREINDEXED());
  return 6;
}

int
CCpu::I0x22()
{
  return 2;
}

int
CCpu::I0x23()
{
  return 2;
}

int
CCpu::I0x24()
{
  BIT(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0x25()
{
  AND(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0x26()
{
  ROL(GET_ADDR_ZEROPAGE());
  return 5;
}

int
CCpu::I0x27()
{
  return 2;
}

int
CCpu::I0x28()
{
  PLP();
  return 4;
}

int
CCpu::I0x29()
{
  AND(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0x2A()
{
  ROL_A();
  return 2;
}

int
CCpu::I0x2B()
{
  return 2;
}

int
CCpu::I0x2C()
{
  BIT(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0x2D()
{
  AND(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0x2E()
{
  ROL(GET_ADDR_ABSOLUTE());
  return 6;
}

int
CCpu::I0x2F()
{
  return 2;
}

int
CCpu::I0x30()
{
  BMI();
  return 2;
}

int
CCpu::I0x31()
{
  AND(GET_DATA_POSTINDEXED());
  return 5;
}

int
CCpu::I0x32()
{
  return 2;
}

int
CCpu::I0x33()
{
  return 2;
}

int
CCpu::I0x34()
{
  m_Register.PC++;
  return 4;
}

int
CCpu::I0x35()
{
  AND(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0x36()
{
  ROL(GET_ADDR_ZEROPAGE_X());
  return 6;
}

int
CCpu::I0x37()
{
  return 2;
}

int
CCpu::I0x38()
{
  SET_FLAG(C_FLAG);
  return 2;
}

int
CCpu::I0x39()
{
  AND(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0x3A()
{
  return 2;
}

int
CCpu::I0x3B()
{
  return 2;
}

int
CCpu::I0x3C()
{
  m_Register.PC += 2;
  return 4;
}

int
CCpu::I0x3D()
{
  AND(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0x3E()
{
  ROL(GET_ADDR_ABSOLUTE_X());
  return 7;
}

int
CCpu::I0x3F()
{
  return 2;
}

int
CCpu::I0x40()
{
  RTI();
  return 6;
}

int
CCpu::I0x41()
{
  EOR(GET_DATA_PREINDEXED());
  return 6;
}

int
CCpu::I0x42()
{
  return 2;
}

int
CCpu::I0x43()
{
  return 2;
}

int
CCpu::I0x44()
{
  m_Register.PC++;
  return 3;
}

int
CCpu::I0x45()
{
  EOR(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0x46()
{
  LSR(GET_ADDR_ZEROPAGE());
  return 5;
}

int
CCpu::I0x47()
{
  return 2;
}

int
CCpu::I0x48()
{
  PHA();
  return 3;
}

int
CCpu::I0x49()
{
  EOR(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0x4A()
{
  LSR_A();
  return 2;
}

int
CCpu::I0x4B()
{
  return 2;
}

int
CCpu::I0x4C()
{
  JMP(GET_ADDR_ABSOLUTE());
  return 3;
}

int
CCpu::I0x4D()
{
  EOR(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0x4E()
{
  LSR(GET_ADDR_ABSOLUTE());
  return 6;
}

int
CCpu::I0x4F()
{
  return 2;
}

int
CCpu::I0x50()
{
  BVC();
  return 2;
}

int
CCpu::I0x51()
{
  EOR(GET_DATA_POSTINDEXED());
  return 5;
}

int
CCpu::I0x52()
{
  return 2;
}

int
CCpu::I0x53()
{
  return 2;
}

int
CCpu::I0x54()
{
  m_Register.PC++;
  return 4;
}

int
CCpu::I0x55()
{
  EOR(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0x56()
{
  LSR(GET_ADDR_ZEROPAGE_X());
  return 6;
}

int
CCpu::I0x57()
{
  return 2;
}

int
CCpu::I0x58()
{
  CLEAR_FLAG(I_FLAG);
  return 2;
}

int
CCpu::I0x59()
{
  EOR(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0x5A()
{
  return 2;
}

int
CCpu::I0x5B()
{
  return 2;
}

int
CCpu::I0x5C()
{
  m_Register.PC += 2;
  return 4;
}

int
CCpu::I0x5D()
{
  EOR(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0x5E()
{
  LSR(GET_ADDR_ABSOLUTE_X());
  return 7;
}

int
CCpu::I0x5F()
{
  return 2;
}

int
CCpu::I0x60()
{
  RTS();
  return 6;
}

int
CCpu::I0x61()
{
  ADC(GET_DATA_PREINDEXED());
  return 6;
}

int
CCpu::I0x62()
{
  return 2;
}

int
CCpu::I0x63()
{
  return 2;
}

int
CCpu::I0x64()
{
  m_Register.PC++;
  return 3;
}

int
CCpu::I0x65()
{
  ADC(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0x66()
{
  ROR(GET_ADDR_ZEROPAGE());
  return 5;
}

int
CCpu::I0x67()
{
  return 2;
}

int
CCpu::I0x68()
{
  PLA();
  return 4;
}

int
CCpu::I0x69()
{
  ADC(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0x6A()
{
  ROR_A();
  return 2;
}

int
CCpu::I0x6B()
{
  return 2;
}

int
CCpu::I0x6C()
{
  u16 addr = GET_ADDR_ABSOLUTE();
  JMP(ReadWord(addr));
  return 5;
}

int
CCpu::I0x6D()
{
  ADC(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0x6E()
{
  ROR(GET_ADDR_ABSOLUTE());
  return 6;
}

int
CCpu::I0x6F()
{
  return 2;
}

int
CCpu::I0x70()
{
  BVS();
  return 2;
}

int
CCpu::I0x71()
{
  ADC(GET_DATA_POSTINDEXED());
  return 5;
}

int
CCpu::I0x72()
{
  return 2;
}

int
CCpu::I0x73()
{
  return 2;
}

int
CCpu::I0x74()
{
  m_Register.PC++;
  return 4;
}

int
CCpu::I0x75()
{
  ADC(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0x76()
{
  ROR(GET_ADDR_ZEROPAGE_X());
  return 6;
}

int
CCpu::I0x77()
{
  return 2;
}

int
CCpu::I0x78()
{
  SET_FLAG(I_FLAG);
  return 2;
}

int
CCpu::I0x79()
{
  ADC(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0x7A()
{
  return 2;
}

int
CCpu::I0x7B()
{
  return 2;
}

int
CCpu::I0x7C()
{
  m_Register.PC += 2;
  return 4;
}

int
CCpu::I0x7D()
{
  ADC(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0x7E()
{
  ROR(GET_ADDR_ABSOLUTE_X());
  return 7;
}

int
CCpu::I0x7F()
{
  return 2;
}

int
CCpu::I0x80()
{
  m_Register.PC++;
  return 2;
}

int
CCpu::I0x81()
{
  STA(GET_ADDR_PREINDEXED());
  return 6;
}

int
CCpu::I0x82()
{
  m_Register.PC++;
  return 2;
}

int
CCpu::I0x83()
{
  return 2;
}

int
CCpu::I0x84()
{
  STY(GET_ADDR_ZEROPAGE());
  return 3;
}

int
CCpu::I0x85()
{
  STA(GET_ADDR_ZEROPAGE());
  return 3;
}

int
CCpu::I0x86()
{
  STX(GET_ADDR_ZEROPAGE());
  return 3;
}

int
CCpu::I0x87()
{
  return 2;
}

int
CCpu::I0x88()
{
  DEY();
  return 2;
}

int
CCpu::I0x89()
{
  m_Register.PC++;
  return 2;
}

int
CCpu::I0x8A()
{
  TXA();
  return 2;
}

int
CCpu::I0x8B()
{
  return 2;
}

int
CCpu::I0x8C()
{
  STY(GET_ADDR_ABSOLUTE());
  return 4;
}

int
CCpu::I0x8D()
{
  STA(GET_ADDR_ABSOLUTE());
  return 4;
}

int
CCpu::I0x8E()
{
  STX(GET_ADDR_ABSOLUTE());
  return 4;
}

int
CCpu::I0x8F()
{
  return 2;
}

int
CCpu::I0x90()
{
  BCC();
  return 2;
}

int
CCpu::I0x91()
{
  STA(GET_ADDR_POSTINDEXED());
  return 6;
}

int
CCpu::I0x92()
{
  return 2;
}

int
CCpu::I0x93()
{
  return 2;
}

int
CCpu::I0x94()
{
  STY(GET_ADDR_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0x95()
{
  STA(GET_ADDR_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0x96()
{
  STX(GET_ADDR_ZEROPAGE_Y());
  return 4;
}

int
CCpu::I0x97()
{
  return 2;
}

int
CCpu::I0x98()
{
  TYA();
  return 2;
}

int
CCpu::I0x99()
{
  STA(GET_ADDR_ABSOLUTE_Y());
  return 5;
}

int
CCpu::I0x9A()
{
  TXS();
  return 2;
}

int
CCpu::I0x9B()
{
  return 2;
}

int
CCpu::I0x9C()
{
  return 2;
}

int
CCpu::I0x9D()
{
  STA(GET_ADDR_ABSOLUTE_X());
  return 5;
}

int
CCpu::I0x9E()
{
  return 2;
}

int
CCpu::I0x9F()
{
  return 2;
}

int
CCpu::I0xA0()
{
  LDY(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0xA1()
{
  LDA(GET_DATA_PREINDEXED());
  return 6;
}

int
CCpu::I0xA2()
{
  LDX(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0xA3()
{
  return 2;
}

int
CCpu::I0xA4()
{
  LDY(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0xA5()
{
  LDA(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0xA6()
{
  LDX(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0xA7()
{
  return 2;
}

int
CCpu::I0xA8()
{
  TAY();
  return 2;
}

int
CCpu::I0xA9()
{
  LDA(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0xAA()
{
  TAX();
  return 2;
}

int
CCpu::I0xAB()
{
  return 2;
}

int
CCpu::I0xAC()
{
  LDY(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0xAD()
{
  LDA(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0xAE()
{
  LDX(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0xAF()
{
  return 2;
}

int
CCpu::I0xB0()
{
  BCS();
  return 2;
}

int
CCpu::I0xB1()
{
  LDA(GET_DATA_POSTINDEXED());
  return 5;
}

int
CCpu::I0xB2()
{
  return 2;
}

int
CCpu::I0xB3()
{
  return 2;
}

int
CCpu::I0xB4()
{
  LDY(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0xB5()
{
  LDA(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0xB6()
{
  LDX(GET_DATA_ZEROPAGE_Y());
  return 4;
}

int
CCpu::I0xB7()
{
  return 2;
}

int
CCpu::I0xB8()
{
  CLEAR_FLAG(V_FLAG);
  return 2;
}

int
CCpu::I0xB9()
{
  LDA(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0xBA()
{
  TSX();
  return 2;
}

int
CCpu::I0xBB()
{
  return 2;
}

int
CCpu::I0xBC()
{
  LDY(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0xBD()
{
  LDA(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0xBE()
{
  LDX(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0xBF()
{
  return 2;
}

int
CCpu::I0xC0()
{
  CPY(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0xC1()
{
  CMP(GET_DATA_PREINDEXED());
  return 6;
}

int
CCpu::I0xC2()
{
  m_Register.PC++;
  return 2;
}

int
CCpu::I0xC3()
{
  return 2;
}

int
CCpu::I0xC4()
{
  CPY(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0xC5()
{
  CMP(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0xC6()
{
  DEC(GET_DATA_IMMEDIATE());
  return 5;
}

int
CCpu::I0xC7()
{
  return 2;
}

int
CCpu::I0xC8()
{
  INY();
  return 2;
}

int
CCpu::I0xC9()
{
  CMP(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0xCA()
{
  DEX();
  return 2;
}

int
CCpu::I0xCB()
{
  return 2;
}

int
CCpu::I0xCC()
{
  CPY(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0xCD()
{
  CMP(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0xCE()
{
  DEC(GET_ADDR_ABSOLUTE());
  return 6;
}

int
CCpu::I0xCF()
{
  return 2;
}

int
CCpu::I0xD0()
{
  BNE();
  return 2;
}

int
CCpu::I0xD1()
{
  CMP(GET_DATA_POSTINDEXED());
  return 5;
}

int
CCpu::I0xD2()
{
  return 2;
}

int
CCpu::I0xD3()
{
  return 2;
}

int
CCpu::I0xD4()
{
  m_Register.PC++;
  return 4;
}

int
CCpu::I0xD5()
{
  CMP(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0xD6()
{
  DEC(GET_ADDR_ZEROPAGE_X());
  return 6;
}

int
CCpu::I0xD7()
{
  return 2;
}

int
CCpu::I0xD8()
{
  CLEAR_FLAG(D_FLAG);
  return 2;
}

int
CCpu::I0xD9()
{
  CMP(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0xDA()
{
  return 2;
}

int
CCpu::I0xDB()
{
  return 2;
}

int
CCpu::I0xDC()
{
  m_Register.PC += 2;
  return 4;
}

int
CCpu::I0xDD()
{
  CMP(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0xDE()
{
  DEC(GET_ADDR_ABSOLUTE_X());
  return 7;
}

int
CCpu::I0xDF()
{
  return 2;
}

int
CCpu::I0xE0()
{
  CPX(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0xE1()
{
  SBC(GET_DATA_PREINDEXED());
  return 6;
}

int
CCpu::I0xE2()
{
  m_Register.PC++;
  return 2;
}

int
CCpu::I0xE3()
{
  return 2;
}

int
CCpu::I0xE4()
{
  CPX(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0xE5()
{
  SBC(GET_DATA_ZEROPAGE());
  return 3;
}

int
CCpu::I0xE6()
{
  INC(GET_ADDR_ZEROPAGE());
  return 5;
}

int
CCpu::I0xE7()
{
  return 2;
}

int
CCpu::I0xE8()
{
  INX();
  return 2;
}

int
CCpu::I0xE9()
{
  SBC(GET_DATA_IMMEDIATE());
  return 2;
}

int
CCpu::I0xEA()
{
  return 2;
}

int
CCpu::I0xEB()
{
  return 2;
}

int
CCpu::I0xEC()
{
  CPX(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0xED()
{
  SBC(GET_DATA_ABSOLUTE());
  return 4;
}

int
CCpu::I0xEE()
{
  INC(GET_ADDR_ABSOLUTE());
  return 6;
}

int
CCpu::I0xEF()
{
  return 2;
}

int
CCpu::I0xF0()
{
  BEQ();
  return 2;
}

int
CCpu::I0xF1()
{
  SBC(GET_DATA_POSTINDEXED());
  return 5;
}

int
CCpu::I0xF2()
{
  return 2;
}

int
CCpu::I0xF3()
{
  return 2;
}

int
CCpu::I0xF4()
{
  m_Register.PC++;
  return 4;
}

int
CCpu::I0xF5()
{
  SBC(GET_DATA_ZEROPAGE_X());
  return 4;
}

int
CCpu::I0xF6()
{
  INC(GET_ADDR_ZEROPAGE_X());
  return 6;
}

int
CCpu::I0xF7()
{
  return 2;
}

int
CCpu::I0xF8()
{
  SET_FLAG(D_FLAG);
  return 2;
}

int
CCpu::I0xF9()
{
  SBC(GET_DATA_ABSOLUTE_Y());
  return 4;
}

int
CCpu::I0xFA()
{
  return 2;
}

int
CCpu::I0xFB()
{
  return 2;
}

int
CCpu::I0xFC()
{
  m_Register.PC += 2;
  return 4;
}

int
CCpu::I0xFD()
{
  SBC(GET_DATA_ABSOLUTE_X());
  return 4;
}

int
CCpu::I0xFE()
{
  INC(GET_ADDR_ABSOLUTE_X());
  return 7;
}

int
CCpu::I0xFF()
{
  return 2;
}
